<form id="form1" method="post">
	<input name="id" id="id" class="mini-hidden" value="0"/>
	<div style="padding-left:11px;padding-bottom:5px;">
		<table style="table-layout:fixed;">
			<tr>
				<td style="width:100px;">审核人员：</td>
				<td style="width:140px;"><input name="staff" class="mini-textbox" enabled="false" value="<?=$StaffInfo["name"];?>" style="width:100%;"/></td>
				<td style="width:100px;">审核状态：</td>
				<td style="width:140px;"><input name="status" class="mini-combobox" textField="name" valueField="name" value="通过" data="[{name:'通过'},{name:'未通过'}]" allowInput="true" style="width:100%;"/></td>
			</tr>
			<tr>
				<td style="width:100px;">描述：</td>
				<td style="width:200px;" colspan="3"><input name="remark" class="mini-textarea" style="width:100%;height:120px;" emptyText="请输入描述"/></td>
			</tr>
		</table>
	</div>
	<div style="text-align:center;padding:10px;">   
		<a class="mini-button" onclick="onOk" style="width:60px;margin-right:20px;">确定</a>   
		<a class="mini-button" onclick="onCancel" style="width:60px;">取消</a>   
	</div>
</form>
<script type="text/javascript">
mini.parse();
var form = new mini.Form("form1");

function SaveData() {
	form.validate();
	if (form.isValid() == false) return;
	$.ajax({
		type:"POST",
		url:"/business/reviewUpd",
		data:{data:form.getData()},
		cache: false,
		success: function (text) {
			CloseWindow("save");
		},
		error: function (jqXHR, textStatus, errorThrown) {
			CloseWindow();
		}
	});
}

function SetData(data) {
	if (data.action == "edit") {
		data = mini.clone(data);
		mini.get("id").setValue(data.id);
	}
}

function CloseWindow(action) {
	if (action == "close" && form.isChanged()) {
		if (confirm("数据被修改了，是否先保存？")) {
			return false;
		}
	}
	if (window.CloseOwnerWindow){
		return window.CloseOwnerWindow(action);
	}else{
		window.close();
	}
}

function onOk(e) {
	SaveData();
}
function onCancel(e) {
	CloseWindow("cancel");
}
</script>
